package com.zhiyou100.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyou100.model.Visitors;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author YQL
 *
 */
public interface VisitorsDao
        extends BaseMapper<Visitors> {
    @Select("SELECT vid,visiting_name" +
            ",vvinterviewed_name,visiting_number" +
            ",vreserve_time,vstatus" +
            ",vvinterviewed_phone" +
            ",vvinterviewed_identity_number,vnexus" +
            ",vvinterviewed_image,vcheck_time " +
            "FROM visitors WHERE" +
            " (date_format(vreserve_time,'%Y') =" +
            " date_format(now(),'%Y')) and" +
            "(date_format(vreserve_time,'%m') =" +
            " date_format(now(),'%m')) and" +
            "(date_format(vreserve_time,'%d') =" +
            " date_format(now(),'%d'))")
    List<Visitors> getNow();
}
